Optimal. Leaf size=78 \[ \frac {(b c-a d)^2 (c+d x)^{n+1}}{d^3 (n+1)}-\frac {2 b (b c-a d) (c+d x)^{n+2}}{d^3 (n+2)}+\frac {b^2 (c+d x)^{n+3}}{d^3 (n+3)} \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {43} \begin {gather*} \frac {(b c-a d)^2 (c+d x)^{n+1}}{d^3 (n+1)}-\frac {2 b (b c-a d) (c+d x)^{n+2}}{d^3 (n+2)}+\frac {b^2 (c+d x)^{n+3}}{d^3 (n+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rubi steps
\begin {align*} \int (a+b x)^2 (c+d x)^n \, dx &=\int \left (\frac {(-b c+a d)^2 (c+d x)^n}{d^2}-\frac {2 b (b c-a d) (c+d x)^{1+n}}{d^2}+\frac {b^2 (c+d x)^{2+n}}{d^2}\right ) \, dx\\ &=\frac {(b c-a d)^2 (c+d x)^{1+n}}{d^3 (1+n)}-\frac {2 b (b c-a d) (c+d x)^{2+n}}{d^3 (2+n)}+\frac {b^2 (c+d x)^{3+n}}{d^3 (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 67, normalized size = 0.86 \begin {gather*} \frac {(c+d x)^{n+1} \left (-\frac {2 b (c+d x) (b c-a d)}{n+2}+\frac {(b c-a d)^2}{n+1}+\frac {b^2 (c+d x)^2}{n+3}\right )}{d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.04, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x)^2 (c+d x)^n \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.35, size = 237, normalized size = 3.04 \begin {gather*} \frac {{\left (a^{2} c d^{2} n^{2} + 2 \, b^{2} c^{3} - 6 \, a b c^{2} d + 6 \, a^{2} c d^{2} + {\left (b^{2} d^{3} n^{2} + 3 \, b^{2} d^{3} n + 2 \, b^{2} d^{3}\right )} x^{3} + {\left (6 \, a b d^{3} + {\left (b^{2} c d^{2} + 2 \, a b d^{3}\right )} n^{2} + {\left (b^{2} c d^{2} + 8 \, a b d^{3}\right )} n\right )} x^{2} - {\left (2 \, a b c^{2} d - 5 \, a^{2} c d^{2}\right )} n + {\left (6 \, a^{2} d^{3} + {\left (2 \, a b c d^{2} + a^{2} d^{3}\right )} n^{2} - {\left (2 \, b^{2} c^{2} d - 6 \, a b c d^{2} - 5 \, a^{2} d^{3}\right )} n\right )} x\right )} {\left (d x + c\right )}^{n}}{d^{3} n^{3} + 6 \, d^{3} n^{2} + 11 \, d^{3} n + 6 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.93, size = 385, normalized size = 4.94 \begin {gather*} \frac {{\left (d x + c\right )}^{n} b^{2} d^{3} n^{2} x^{3} + {\left (d x + c\right )}^{n} b^{2} c d^{2} n^{2} x^{2} + 2 \, {\left (d x + c\right )}^{n} a b d^{3} n^{2} x^{2} + 3 \, {\left (d x + c\right )}^{n} b^{2} d^{3} n x^{3} + 2 \, {\left (d x + c\right )}^{n} a b c d^{2} n^{2} x + {\left (d x + c\right )}^{n} a^{2} d^{3} n^{2} x + {\left (d x + c\right )}^{n} b^{2} c d^{2} n x^{2} + 8 \, {\left (d x + c\right )}^{n} a b d^{3} n x^{2} + 2 \, {\left (d x + c\right )}^{n} b^{2} d^{3} x^{3} + {\left (d x + c\right )}^{n} a^{2} c d^{2} n^{2} - 2 \, {\left (d x + c\right )}^{n} b^{2} c^{2} d n x + 6 \, {\left (d x + c\right )}^{n} a b c d^{2} n x + 5 \, {\left (d x + c\right )}^{n} a^{2} d^{3} n x + 6 \, {\left (d x + c\right )}^{n} a b d^{3} x^{2} - 2 \, {\left (d x + c\right )}^{n} a b c^{2} d n + 5 \, {\left (d x + c\right )}^{n} a^{2} c d^{2} n + 6 \, {\left (d x + c\right )}^{n} a^{2} d^{3} x + 2 \, {\left (d x + c\right )}^{n} b^{2} c^{3} - 6 \, {\left (d x + c\right )}^{n} a b c^{2} d + 6 \, {\left (d x + c\right )}^{n} a^{2} c d^{2}}{d^{3} n^{3} + 6 \, d^{3} n^{2} + 11 \, d^{3} n + 6 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 159, normalized size = 2.04 \begin {gather*} \frac {\left (b^{2} d^{2} n^{2} x^{2}+2 a b \,d^{2} n^{2} x +3 b^{2} d^{2} n \,x^{2}+a^{2} d^{2} n^{2}+8 a b \,d^{2} n x -2 b^{2} c d n x +2 b^{2} x^{2} d^{2}+5 a^{2} d^{2} n -2 a b c d n +6 a b \,d^{2} x -2 b^{2} c d x +6 a^{2} d^{2}-6 a b c d +2 b^{2} c^{2}\right ) \left (d x +c \right )^{n +1}}{\left (n^{3}+6 n^{2}+11 n +6\right ) d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.17, size = 138, normalized size = 1.77 \begin {gather*} \frac {2 \, {\left (d^{2} {\left (n + 1\right )} x^{2} + c d n x - c^{2}\right )} {\left (d x + c\right )}^{n} a b}{{\left (n^{2} + 3 \, n + 2\right )} d^{2}} + \frac {{\left (d x + c\right )}^{n + 1} a^{2}}{d {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} d^{3} x^{3} + {\left (n^{2} + n\right )} c d^{2} x^{2} - 2 \, c^{2} d n x + 2 \, c^{3}\right )} {\left (d x + c\right )}^{n} b^{2}}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.62, size = 226, normalized size = 2.90 \begin {gather*} {\left (c+d\,x\right )}^n\,\left (\frac {c\,\left (a^2\,d^2\,n^2+5\,a^2\,d^2\,n+6\,a^2\,d^2-2\,a\,b\,c\,d\,n-6\,a\,b\,c\,d+2\,b^2\,c^2\right )}{d^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {b^2\,x^3\,\left (n^2+3\,n+2\right )}{n^3+6\,n^2+11\,n+6}+\frac {x\,\left (a^2\,d^3\,n^2+5\,a^2\,d^3\,n+6\,a^2\,d^3+2\,a\,b\,c\,d^2\,n^2+6\,a\,b\,c\,d^2\,n-2\,b^2\,c^2\,d\,n\right )}{d^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {b\,x^2\,\left (n+1\right )\,\left (6\,a\,d+2\,a\,d\,n+b\,c\,n\right )}{d\,\left (n^3+6\,n^2+11\,n+6\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.09, size = 1506, normalized size = 19.31
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________